Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeviceCodes::poll_until_available method #679

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

mkrasnitski
Copy link
Contributor

The polling behavior is specified by the GitHub API (such as waiting minimum 5 seconds between polls and what to do if you get a slow_down error). Therefore, it would be best for users not to implement this logic themselves as they may get it wrong. In principle it might even be a good idea to remove the poll_once method and just have poll_until_available.

I'm not sure if await-ing this function will actually block, but I'm assuming tokio will properly schedule other things while we're waiting to poll.

@XAMPPRocky XAMPPRocky merged commit 8aa113e into XAMPPRocky:main Aug 30, 2024
11 checks passed
@XAMPPRocky
Copy link
Owner

Thank you for your PR!

@github-actions github-actions bot mentioned this pull request Aug 30, 2024
benpueschel pushed a commit to benpueschel/octocrab that referenced this pull request Aug 30, 2024
@mkrasnitski mkrasnitski deleted the oauth-poll branch September 15, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants